<script setup lang="ts" name="Son">
import {ref} from "vue";

const emit = defineEmits(['send-toy'])
let toy = ref('奥特曼')
</script>

<template>
<h3>子组件</h3>
  <button @click="emit('send-toy', toy)">点我触发自定义事件send-toy</button>
</template>

<style scoped>

</style>